
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_comm_base_framework/core/utils/ColorsUtil.dart';

class StyleUtil
{
  static AppTextStyle textStyle = AppTextStyle();
  static const TextStyle bold16 = TextStyle(color: ColorsUtil.black_333,fontSize: 16,fontWeight: FontWeight.w700);
  static const TextStyle txS333 = TextStyle(fontSize: 14,color: ColorsUtil.black_333);
  static const TextStyle txS666 = TextStyle(fontSize: 14,color: ColorsUtil.black_666);
  static const TextStyle txS999 = TextStyle(color: ColorsUtil.grey_999,fontSize: 14);
  static const TextStyle tx12 = TextStyle(fontSize: 12,color: ColorsUtil.black_333);

  static const UnderlineInputBorder input_line_grey = UnderlineInputBorder(borderSide: BorderSide(color: ColorsUtil.grey_line));

}

class AppTextStyle
{
   TextStyle navTitleTextStyle = TextStyle(fontWeight: FontWeight.w700, fontSize: 18,color: Color(0xffffffff));
   TextStyle btnInRowTitleNormalTextStyle = TextStyle(fontSize: 14,color: ColorsUtil.black_333);
   TextStyle inptHintTextStyle = TextStyle(color: ColorsUtil.grey_999,fontSize: 14);

   TextStyle cardTitleTextStyle = TextStyle(fontWeight: FontWeight.w700 ,fontSize: 16);
   TextStyle body1TextStyle = TextStyle(color: ColorsUtil.black_333,fontSize: 14);
   TextStyle body2TextStyle = TextStyle(color: ColorsUtil.black_999,fontSize: 14);
}

class InputDecorationUtil
{

  static InputDecoration customer({icon,
    labelText,
    labelStyle,
    helperText,
    helperStyle,
    helperMaxLines,
    hintText,
    hintStyle,
    hintMaxLines,
    errorText,
    errorStyle,
    errorMaxLines,
    hasFloatingPlaceholder = true, // ignore: deprecated_member_use_from_same_package
    floatingLabelBehavior = FloatingLabelBehavior.auto,
    isDense,
    contentPadding,
    prefixIcon,
    prefixIconConstraints,
    prefix,
    prefixText,
    prefixStyle,
    suffixIcon,
    suffix,
    suffixText,
    suffixStyle,
    suffixIconConstraints,
    counter,
    counterText,
    counterStyle,
    filled,
    fillColor,
    focusColor,
    hoverColor,
    errorBorder,
    focusedBorder,
    focusedErrorBorder,
    disabledBorder,
    enabledBorder,
    border,
    enabled = true,
    semanticCounterText,
    alignLabelWithHint,
  }) {
    return InputDecoration(labelText: labelText,
        labelStyle: labelStyle,
        helperText: helperText,
        helperStyle: helperStyle,
        helperMaxLines: helperMaxLines,
        hintText: hintText,
        hintStyle: hintStyle ?? StyleUtil.textStyle.inptHintTextStyle,
        hintMaxLines: hintMaxLines,
        errorText: errorText,
        errorStyle: errorStyle,
        errorMaxLines: errorMaxLines,
        hasFloatingPlaceholder: hasFloatingPlaceholder,
        // ignore: deprecated_member_use_from_same_package
        floatingLabelBehavior: floatingLabelBehavior,
        contentPadding: contentPadding,
        prefixIcon: prefixIcon,
        prefixIconConstraints: prefixIconConstraints,
        prefix: prefix,
        prefixText: prefixText,
        prefixStyle: prefixStyle,
        suffixIcon: suffixIcon,
        suffix: suffix,
        suffixText: suffixText,
        suffixStyle: suffixStyle,
        suffixIconConstraints: suffixIconConstraints,
        counter: counter,
        counterText: counterText,
        counterStyle: counterStyle,
        filled: filled,
        fillColor: fillColor,
        focusColor: focusColor,
        hoverColor: hoverColor,
        errorBorder: errorBorder,
        focusedBorder: focusedBorder,
        focusedErrorBorder: focusedErrorBorder,
        enabledBorder:  enabledBorder ?? UnderlineInputBorder(
            borderSide: BorderSide(color: ColorsUtil.grey_line)),
        disabledBorder:disabledBorder?? UnderlineInputBorder(
            borderSide: BorderSide(color: ColorsUtil.grey_line)),
        border: border,
        enabled: enabled,
        semanticCounterText: semanticCounterText,
        alignLabelWithHint: alignLabelWithHint);
  }
}